{% if (PIWIK_URL and PIWIK_SITE_ID) or (MATOMO_URL and MATOMO_SITE_ID) %}
<script type="text/javascript">
  var _paq = window._paq || [];
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="https://{{ MATOMO_URL or  PIWIK_URL }}/";
    _paq.push(['setTrackerUrl', u+'matomo.php']);
    _paq.push(['setSiteId', {{ MATOMO_SITE_ID or PIWIK_SITE_ID }}]);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
  })();
</script>
<noscript><p><img src="https://{{ MATOMO_URL or PIWIK_URL }}/matomo.php?idsite={{ MATOMO_SITE_ID or PIWIK_SITE_ID }}&rec=1" style="border:0" alt="" /></p></noscript>
{% endif %}
